<style>
/*skin:web.bendoi.vn*/
div.tygiangoaite{
    background:#0E5841;
    font: normal normal 13px  Tahoma;
    color:#fff;
    padding:5px;
}
table.tygiangoaite {
    border-collapse: collapse;
    width: 195px;
}
table.tygiangoaite .th{
    background: #FEFECE;
    font: italic normal 13px arial;
    color: #919090; 
    text-align: right;
}
table.tygiangoaite td{
    border: 1px dotted #ccc; 
    padding:2px;
}
table.tygiangoaite td.r{
    text-align: right;
}
table.tygiangoaite td.c{
    text-align: center;
}
table.tygiangoaite tr:hover{
    background:#D4E6CC;
}
</style>
<?php
    $rate = new ratebs();
    $rate->mydate = '';
	$rate->source = 'http://www.vietcombank.com.vn/ExchangeRates/ExrateXML.aspx';
    
    $data = $rate->getRate();
    
    if($data != false)
    {
        //ksort($data);
    	print '<table class="tygiangoaite">';
        	print '<tr class="th">
                        <td colspan="3">Nguồn Vietcombank</td>
                    </tr>';
        	print '<tr class="td">
                        <td></td>
                        <td class = "c">Mua vào</td>
                        <td class = "c">Bán ra</td>
                   </tr>';
        	foreach($data as $k=>$v)
            {
                if($v['BUY'] != 0)
                {
        	       print '<tr>
                        <td>'.$v['CURRENCYCODE'].' </td>
                        <td class="r"> '.$v['TRANSFER'].'</td>
                        <td class="r">'.$v['SELL'].'</td>
                      </tr>';
                }
            }
    	print '</table>';
    }
?>